home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / ColorSync™ 1.0.3 / Interfaces / CIncludes / CMComponent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-19  |  3.3 KB  |  126 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CMComponent.h
  3.  
  4.     Contains:    Headers for CMM components
  5.  
  6.     Written by:    Konstantin Othmer
  7.  
  8.     Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  9.  
  10. */
  11.  
  12.  
  13. /************************************************************
  14.  
  15. Created: Saturday, November 14, 1992 at 6:00 PM
  16.  CMComponent.h
  17.  C Interface to the Macintosh Libraries
  18.  
  19.  
  20.  Copyright Apple Computer, Inc. 1991 - 1992
  21.  All rights reserved
  22.  
  23. ************************************************************/
  24.  
  25.  
  26. #ifndef __CMCOMPONENT__
  27. #define __CMCOMPONENT__
  28.  
  29. #ifndef __TYPES__
  30. #include <Types.h>
  31. #endif
  32.  
  33. #ifndef __QUICKDRAW__
  34. #include <QuickDraw.h>
  35. #endif
  36.  
  37. #ifndef __COMPONENTS__
  38. #include <Components.h>
  39. #endif
  40.  
  41. #ifndef __CMAPPLICATION__
  42. #include <CMApplication.h>
  43. #endif
  44.  
  45.  
  46. /*
  47. ** CMM Components
  48. */
  49.  
  50. #define     CMInterfaceVersion            0
  51.  
  52. /* CMM Component function selectors */
  53. #define    kCMInit                            0
  54. #define    kCMMatchColors                    1
  55. #define    kCMGamutTest                    2
  56. #define    kCMMatchPixMap                    3
  57. #define    kCMCheckPixMap                    4
  58. #define    kCMConcatenateProfiles            5
  59.  
  60.  
  61. /*
  62. ** Profile Responder Components
  63. */
  64.  
  65. #define ProfileResponderInterfaceRev    0
  66.  
  67. /* ProfileResponder Component function selectors */
  68. #define    kCMGetProfile                    0
  69. #define    kCMSetProfile                    1
  70. #define    kCMSetProfileDescription        2
  71. #define    kCMGetIndexedProfile            3
  72. #define    kCMDeleteDeviceProfile            4
  73. #define    kProfileResponderMaxSelector    kCMDeleteDeviceProfile
  74.  
  75.  
  76. typedef ComponentInstance ProfileResponder;
  77.  
  78.  
  79. /*
  80. ** Required CMM Component routines
  81. */
  82.  
  83. pascal CMError CMInit( ComponentInstance CMSession, CMProfileHandle srcProfile,
  84.             CMProfileHandle dstProfile )
  85.     = ComponentCallNow( kCMInit, 0x0008 );
  86.  
  87. pascal CMError CMMatchColors( ComponentInstance CMSession, CMColorList myColors, long count )
  88.     = ComponentCallNow( kCMMatchColors, 0x0008 );
  89.  
  90. pascal CMError CMCheckColors( ComponentInstance CMSession, CMColorList myColors, long count, CMGamutResult result )
  91.     = ComponentCallNow( kCMGamutTest, 0x000C );
  92.  
  93. /*
  94. ** Optional CMM Component routines
  95. */
  96.  
  97. pascal CMError CMMatchPixMap( ComponentInstance CMSession, PixMap *myPixMap, PixMapCallBackProcPtr progressProc, long refCon )
  98.     = ComponentCallNow( kCMMatchPixMap, 0x000c );
  99.  
  100. pascal CMError CMCheckPixMap( ComponentInstance CMSession, PixMap *myPixMap, PixMapCallBackProcPtr progressProc, BitMap *myBitMap, long refCon )
  101.     = ComponentCallNow( kCMCheckPixMap, 0x0010 );
  102.  
  103. pascal CMError CMConcatenateProfiles( ComponentInstance CMSession, CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst )
  104.     = ComponentCallNow( kCMConcatenateProfiles, 0x000C );
  105.  
  106. /*
  107. ** ProfileResponder Component routines
  108. */
  109.  
  110. pascal CMError  CMGetProfile( ProfileResponder myProfileResponder, CMProfileHandle aProfile, CMProfileHandle *returnedProfile )
  111.     = ComponentCallNow( kCMGetProfile, 8 );
  112.  
  113. pascal CMError CMSetProfile( ProfileResponder myProfileResponder, CMProfileHandle newProfile )
  114.     = ComponentCallNow( kCMSetProfile, 4 );
  115.  
  116. pascal CMError CMSetProfileDescription( ProfileResponder myProfileResponder, long DeviceData, CMProfileHandle hProfile )
  117.     = ComponentCallNow( kCMSetProfileDescription, 8 );
  118.  
  119. pascal CMError CMGetIndexedProfile( ProfileResponder myProfileResponder, CMProfileSearchRecordHandle search,
  120.         CMProfileHandle *returnProfile, long *index )
  121.     = ComponentCallNow( kCMGetIndexedProfile, 0x000C );
  122.  
  123. pascal CMError CMDeleteDeviceProfile( ProfileResponder myProfileResponder, CMProfileHandle deleteMe )
  124.     = ComponentCallNow( kCMDeleteDeviceProfile, 4 );
  125.  
  126. #endif